package bolsa;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class operadorInscripcion {
	int id=0;
	Boolean bandera2=false;
	String user = "";
	String empresa="";
	
	public void inserta(){
		try {
			Class.forName("com.mysql.jdbc.Driver");
			Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/bolsita","root","");
			String sql = "INSERT INTO ofertademanda (emailEmp,emailUser,idOferta) VALUES('"+ getEmpresa() +"','"+ getUser() +"',"+ getId() +")";
			Statement stmt = con.createStatement();
			stmt.executeUpdate(sql);
			con.close();
		} catch (Exception ex) {
			  System.out.println(ex.getMessage());
		      //ups!
		}
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Boolean getBandera2() {
		return bandera2;
	}
	public void setBandera2(Boolean bandera2) {
		this.bandera2 = bandera2;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}

	public String getEmpresa() {
		return empresa;
	}

	public void setEmpresa(String empresa) {
		this.empresa = empresa;
	}
	
	
}
